<script setup>
import { useCounterStore } from '../stores/counter'

// 可以在组件中的任意位置访问 `store` 变量 
const store = useCounterStore()

</script>

<template>
  <h1>贴吧</h1>
  <p>{{ store.count }}</p>
  <p>{{ store.doubleCount }}</p>
  <p><button @click="store.increment()">+1</button></p>
  <p><button @click="store.$reset()">重置store</button></p>
</template>

<style scoped>

</style>
